<template>
  <div id="app">
       <vue-header :seller="seller"></vue-header>
       <div class="nav">
        <span>
          <router-link to="/goods">商品</router-link>
        </span>
        <span>
          <router-link to="/rating">评价</router-link>
        </span>
        <span>
          <router-link to="/seller">卖家</router-link>
        </span>
    </div>
    <div class="content">
      <router-view :seller="seller"></router-view>
    </div>
  </div>
</template>
<script>
  import vueHeader from "components/header/header";
  const RES_OK = 200;
  export default {
    name: 'app',
    data (){
      return {
        seller: {}
      }
    },
    components:{
      vueHeader
    },
    mounted () {
      this.axios.get('/static/data.json', {
        params: {}
      })
        .then((res) => {
          if(res.code === RES_OK){}
          this.seller = res.data.seller;
          this.ratingArr = res.data.ratings;
        })
        .catch((error) => {
          console.log(error);
        });
    }
  }

</script>
<style lang="scss">
  @import './common/scss/var.scss';

  .active {
    color: rgb(240,20,20);
  }
  .nav{
    display:flex;
    justify-content:space-around;
    height:40px;
    line-height: 40px;
    font-size:14px;
    border-bottom:1px solid rgba(7,17,27,.1);
    span{
      flex:1;
      text-align: center;
      a{
        display: block;
      }
    }
  }



</style>
